﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using System.Collections.ObjectModel;
using System.Xml;
using System.Xml.XPath;


using log4net;
using CommonLib;

namespace RedfinCrawlPro
{
    class RedfinCrawlPro : FetcherInterface
    {
        private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
        public FetcherConfigBaseRec getConfiguration(XmlNode fetcherNode)
        {
            RedfinConfig _redfinConfigRec = new RedfinConfig();
            FetcherConfigBaseRec baseRec = null;

            if( _redfinConfigRec.LoadConfiguration(fetcherNode) )
            {
                baseRec = _redfinConfigRec as FetcherConfigBaseRec;
            }

            return baseRec;
        }

        public object crawlForData(FetcherConfigBaseRec configRec)
        {

            return RedFinCrawler.crawlForResults(configRec);
        }
    }
}
